home *** CD-ROM | disk | FTP | other *** search
/ SunSoft Catalyst CDWARE 1996 May to August / Catalyst CDWARE 1996 May to August.iso / .products / .bin / httpd / Solaris_1 / update.pl < prev    next >
Perl Script  |  1996-02-29  |  5KB  |  103 lines

  1. #!./perl
  2.  
  3. # ------------------------------------------------------------
  4.  
  5. # initdev.pl, by Jean-Pierre Girard (jpg@corrado.sun.com)
  6. # This allows the development environment to choose what
  7. # page to load depending on the existence of .cdev
  8.  
  9. # ------------------------------------------------------------
  10.  
  11. # Bugs and other fixes
  12.  
  13. # ------------------------------------------------------------
  14. ##############################################################################
  15. # main
  16. ##############################################################################
  17. $BASEDIR = $ENV{"DOCUMENT_ROOT"};
  18. require 'devinfo.pl';
  19. require 'tools.pl';
  20.  
  21. if ($ENV{'REQUEST_METHOD'} eq "POST") {
  22.     read(STDIN, $request, $ENV{'CONTENT_LENGTH'});
  23. } elsif ($ENV{'REQUEST_METHOD'} eq "GET" ) {
  24.     $request = $ENV{'QUERY_STRING'};
  25. }
  26.  
  27. $request =~ s/%(..)/pack("c",hex($1))/ge;
  28. #print "request=$request<br>";
  29. #print "ARGV0=$ARGV[0]<br>";
  30. #if (@ARGV == 0 && $request eq "") {
  31.  
  32. if ($request eq "UPDATE") {
  33.     system("cmdtool $BASEDIR/.bin/update.csh -all");
  34.     #system("$BASEDIR/.bin/update.csh -prod>/dev/null");
  35.     print "Location:  file:///tmp/httpd/.products/CDware/index.html\n\n";
  36. } else {
  37.     $~ = HEADER;
  38.     write;
  39.  
  40.     #print "<h4>\n<app class=\"ImageLoopItem\" img=\"file:///tmp/httpd/.products/DEV/images/blinkingAlert\" ALIGN=middle pause=5000 width=56 height=49>Don't forget to build the CDware files at least once!</h4><ul>";
  41.     print "<h4>\n<img src=\"file:///tmp/httpd/.products/DEV/images/finger.gif\" ALIGN=middle >You can come back to the main menu from your pages using the \"Goto\" menu: select <b>\"Catalyst CDware Developer's Kit - Main menu\"</h4><ul>";
  42.     #print "<h4>\n<img=\"file:///tmp/httpd/.products/DEV/images/finger\" ALIGN=middle >You can come back to the main menu from your pages using the \"Goto\" menu: select <b>\"Catalyst Developer's Kit: main menu\"</h4><ul>";
  43.     print "<H2><IMG src=\"file:///tmp/httpd/.products/DEV/images/bullet_ball_red.gif\"><a href=\"http://localhost:7999/cgi-bin/update.pl?UPDATE\">To build the CDware files</a> (This might take some time!)</H2><ul><p><img ALIGN=middle src=\"file:///tmp/httpd/.products/DEV/images/finger.gif\">This will create automatically HTML pages used for the CDware interface. You need to update this pages each time you changed some information on your company, if you want to see this changes taken into account.</ul></p>";
  44.     if (-s "$BASEDIR/.categories/companies.html") {
  45.         print "<H2><IMG src=\"file:///tmp/httpd/.products/DEV/images/bullet_ball_red.gif\"><a href=\"file:///tmp/httpd/.products/CDware/index.html\">To test your complete insertion</a></H2><br><ul><p><img ALIGN=middle src=\"file:///tmp/httpd/.products/DEV/images/finger.gif\">Some features have been disabled (such as the catalog, or Help) but will be fully available in the version released to the customers.</ul>";
  46.     }
  47.     print "<h4><IMG src=\"file:///tmp/httpd/.products/DEV/images/bullet_ball_red.gif\"><a href=\"http://localhost:7999/cgi-bin/mainmenu.pl?\">To go back to the main menu</a></h4><br>";
  48.  
  49.     $~ = FOOTER;
  50.     write;
  51. }
  52.  
  53. ##############################################################################
  54. # formats
  55. ##############################################################################
  56. format HEADER =
  57. Content-type: text/html
  58.  
  59.  
  60. <html>
  61. <title>Developer's Kit</title>
  62. <body>
  63. #<applet code=AnimatePLUS13.class width=150 height=65>
  64. <applet class=AnimatePLUS13 width=150 height=65>
  65. <param name=FRAMENAME value="comp">
  66. <param name=NUMBER value=6>
  67. <param name=RATE value=200>
  68. <param name=BACKGROUND value=frames/background3>
  69. <param name=CYCLES value="infinite">
  70. <param name=PAUSE value=2000>
  71. <param name=POSITIONDEFAULT value=(0)&(35)>
  72. <param name=TRANSITIONS value=SHRINK9,SHRINK9,SHRINK9,SHRINK9,SHRINK9,SHRINK9,SHRINK9,SHRINK9,SHRINK9,SHRINK9>
  73. <param name=BORDER value=3>
  74. <param name=BORDERCOLOR value=0,0,225>
  75. <param name=DIMENSIONS value=240,50>
  76. </applet>
  77. <CENTER><h1>CDware Developer's Kit</h1></CENTER>
  78. .
  79.  
  80. format FOOTER =
  81. </ul>
  82. <p>
  83. <hr>
  84. <p>
  85. You, like these companies, will benefit from the CDware capability of reaching tens of thousands of potential customers with information, links to your web site, or directly with YOUR product!
  86. <p><app class=ImageTape width=596 height=65 img_dir=../../../DEV/logos speed=10 dir=-10
  87. url1=oracle
  88. url2=progress
  89. url3=gupta
  90. url4=informix
  91. url5=lotus
  92. url6=ingres
  93. >
  94. </b>
  95. <h5><p><A HREF=file:///tmp/httpd/.products/CDware/Help/SMICopyright.html>Copyright</A> 1995 Sun Microsystems, Inc., 2550 Garcia Ave., Mtn. View, CA 94043 USA.  All rights reserved.</h5><br></pre>
  96. <a href=file:///tmp/httpd/.products/DEV/credits.html>Credits</a>
  97. </b>
  98. </form>
  99. </body>
  100. </html>
  101. .
  102.  
  103.